package com.project.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 订单明细实体类
 */
@TableName("t_detail")
public class DetailBean {
    /**明细编号**/
    @TableField("pk_detailId")
    private Integer id;
    /**订单编号**/
    @TableField("fk_orderId")
    private Integer orderId;
    /**商品编号**/
    @TableField("fk_productId")
    private Integer productId;
    /**商品对象**/
    @TableField(exist = false)
    private ProductBean product;
    /**数量**/
    @TableField("d_num")
    private Integer num;

    public DetailBean() {
    }

    public DetailBean(Integer orderId, Integer productId, Integer num) {
        this.orderId = orderId;
        this.productId = productId;
        this.num = num;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Override
    public String toString() {
        return "DetailBean{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", productId=" + productId +
                ", product=" + product +
                ", num=" + num +
                "}\n";
    }
}
